Steps
export DIST=focal
export DIST=kinetic
export ID=8001
wget \
https://cloud-images.ubuntu.com/$DIST/current/${DIST}-server-cloudimg-amd64.img
qm create 8001 \
--memory 2048 --core 2 \
--name ubuntu-$DIST \
--net0 virtio,bridge=vmbr1 \
--scsihw virtio-scsi-pci
qm set $ID \
--scsi0 local:0,import-from=/root/$DIST-server-cloudimg-amd64.img
# qm importdisk $ID ${DIST}-server-cloudimg-amd64.img local
# qm set $ID --scsihw virtio-scsi-pci --scsi0 local:vm-8001-disk-0
qm set $ID --ide2 local:cloudinit
qm set $ID --boot c --bootdisk scsi0
qm set $ID --serial0 socket --vga serial0
# configure cloud init: user/pass, ssh key, ...
qm template $ID # create template
# use it
export ID=8005
qm clone $ID 135 --name yoshi --full
qm clone $ID 210 --name k7 --full
# list disks
pvesm list local